//
//  KATTableCellData.h
//  KATFramework
//
//  Created by Kantice on 15/8/5.
//  Copyright (c) 2015年 KatApp. All rights reserved.
//  列表单元数据内容

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "KATHttpUtil.h"
#import "KATHashMap.h"
#import "KATTextStyle.h"
#import "KATButton.h"


#define TABLE_CELL_STATE_READY 0
#define TABLE_CELL_STATE_LEFT 1
#define TABLE_CELL_STATE_RIGHT 2
#define TABLE_CELL_STATE_MOVING 3


@interface KATTableCellData : NSObject


#pragma -mark 属性


#pragma -mark 携带值

///类型
@property(nonatomic,assign) int type;

///编号
@property(nonatomic,assign) int num;

///int值
@property(nonatomic,assign) long long tag;

///int值2
@property(nonatomic,assign) long long index;

///double值
@property(nonatomic,assign) double value;

///字符串值
@property(nonatomic,copy) NSString *message;

///字符串值2
@property(nonatomic,copy) NSString *message2;

///id值
@property(nonatomic,retain) id object;

///状态
@property(nonatomic,assign) int state;


#pragma -mark 样式

///cell高度
@property(nonatomic,assign) double height;

///Y轴坐标
@property(nonatomic,assign) double pointY;


#pragma -mark 控件内容

///是否有图片
@property(nonatomic,assign) BOOL hasImage;

///图片地址
@property(nonatomic,copy) NSString *imagePath;

///图片
@property(nonatomic,retain) UIImage *image;

///是否包含图片的UIImage控件（占内存，速度快）
@property(nonatomic,assign) BOOL hasImageMemory;

///是否有独立的图片frame
@property(nonatomic,assign) BOOL hasImageFrame;

///图片frame
@property(nonatomic,assign) CGRect imageFrame;

///是否有图片2
@property(nonatomic,assign) BOOL hasImage2;

///图片2地址
@property(nonatomic,copy) NSString *image2Path;

///图片2
@property(nonatomic,retain) UIImage *image2;

///是否包含图片2的UIIMage控件（占内存，速度快）
@property(nonatomic,assign) BOOL hasImage2Memory;

///是否有独立的图片2frame
@property(nonatomic,assign) BOOL hasImage2Frame;

///图片2frame
@property(nonatomic,assign) CGRect image2Frame;

///是否有图片3
@property(nonatomic,assign) BOOL hasImage3;

///图片3地址
@property(nonatomic,copy) NSString *image3Path;

///图片3
@property(nonatomic,retain) UIImage *image3;

///是否包含图片3的UIImage控件（占内存，速度快）
@property(nonatomic,assign) BOOL hasImage3Memory;

///是否有独立的图片3frame
@property(nonatomic,assign) BOOL hasImage3Frame;

///图片3frame
@property(nonatomic,assign) CGRect image3Frame;

///标题
@property(nonatomic,copy) NSString *title;

///是否包含独立的标题frame
@property(nonatomic,assign) BOOL hasTitleFrame;

///标题frame
@property(nonatomic,assign) CGRect titleFrame;

///内容
@property(nonatomic,copy) NSString *content;

///是否包含独立的内容frame
@property(nonatomic,assign) BOOL hasContentFrame;

///内容frame
@property(nonatomic,assign) CGRect contentFrame;

///标签1
@property(nonatomic,copy) NSString *label1;

///标签2
@property(nonatomic,copy) NSString *label2;

///标签3
@property(nonatomic,copy) NSString *label3;

///标签4
@property(nonatomic,copy) NSString *label4;

///标签5
@property(nonatomic,copy) NSString *label5;

///textView内容
@property(nonatomic,copy) NSString *text;

///是否包含独立的文本frame
@property(nonatomic,assign) BOOL hasTextFrame;

///文本frame
@property(nonatomic,assign) CGRect textFrame;

///徽标内容
@property(nonatomic,copy) NSString *badge;

///是否包含徽标
@property(nonatomic,assign) BOOL hasBadge;

///是否包含独立的徽标frame
@property(nonatomic,assign) BOOL hasBadgeFrame;

///徽标frame
@property(nonatomic,assign) CGRect badgeFrame;

///背部标签内容
@property(nonatomic,copy) NSString *backLabel;

///是否包含独立的背部标签frame
@property(nonatomic,assign) BOOL hasBackLabelFrame;

///背部标签frame
@property(nonatomic,assign) CGRect backLabelFrame;

///富文本标题
@property(nonatomic,copy) NSString *richTitle;

///是否包含独立的富文本标题frame
@property(nonatomic,assign) BOOL hasRichTitleFrame;

///富文本标题frame
@property(nonatomic,assign) CGRect richTitleFrame;

///是否包含独立的富文本标题样式
@property(nonatomic,assign) BOOL hasRichTitleStyle;

///富文本标题样式
@property(nonatomic,retain) KATTextStyle *richTitleStyle;

///富文本内容
@property(nonatomic,copy) NSString *richContent;

///是否包含独立的富文本内容frame
@property(nonatomic,assign) BOOL hasRichContentFrame;

///富文本内容frame
@property(nonatomic,assign) CGRect richContentFrame;

///是否包含独立的富文本内容样式
@property(nonatomic,assign) BOOL hasRichContentStyle;

///富文本内容样式
@property(nonatomic,retain) KATTextStyle *richContentStyle;

///富文本标签
@property(nonatomic,copy) NSString *richLabel;


#pragma -mark 特殊按钮

///是否包含特殊按钮
@property(nonatomic,assign) BOOL hasSpButton;

///特殊按钮类型
@property(nonatomic,assign) KATButtonType spButtonType;

///特殊按钮frame
@property(nonatomic,assign) CGRect spButtonFrame;

///特殊按钮颜色
@property(nonatomic,retain) UIColor *spButtonColor;

///特殊按钮线宽
@property(nonatomic,assign) float spButtonLineWidth;

///特殊按钮缩放
@property(nonatomic,assign) float spButtonScale;


#pragma -mark 异步加载远程图片

///是否是远程图片
@property(nonatomic,assign) BOOL isRemoteImage;

///当前是否为缓冲图片
@property(nonatomic,assign) BOOL isCacheImage;

///远程图片是否加载完成
@property(nonatomic,assign) BOOL isImageReady;

///加载图片是否失败
@property(nonatomic,assign) BOOL isLoadImageFail;

///是否是远程图片2
@property(nonatomic,assign) BOOL isRemoteImage2;

///当前是否为缓冲图片2
@property(nonatomic,assign) BOOL isCacheImage2;

///远程图片2是否加载完成
@property(nonatomic,assign) BOOL isImage2Ready;

///加载图片2是否失败
@property(nonatomic,assign) BOOL isLoadImage2Fail;

///是否是远程图片3
@property(nonatomic,assign) BOOL isRemoteImage3;

///当前是否为缓冲图片3
@property(nonatomic,assign) BOOL isCacheImage3;

///远程图片是否加载完成
@property(nonatomic,assign) BOOL isImage3Ready;

///加载图片是否失败
@property(nonatomic,assign) BOOL isLoadImage3Fail;


#pragma -mark 颜色和字体

///背景层颜色
@property(nonatomic,retain) UIColor *backBgColor;

///是否包含背景层颜色
@property(nonatomic,assign) BOOL hasBackBgColor;

///中间层颜色
@property(nonatomic,retain) UIColor *midBgColor;

///是否包含中间层层颜色
@property(nonatomic,assign) BOOL hasMidBgColor;

///表层颜色
@property(nonatomic,retain) UIColor *faceBgColor;

///是否包含表层颜色
@property(nonatomic,assign) BOOL hasFaceBgColor;

///标题颜色
@property(nonatomic,retain) UIColor *titleColor;

///是否包含独立的标题颜色
@property(nonatomic,assign) BOOL hasTitleColor;

///标题字体
@property(nonatomic,retain) UIFont *titleFont;

///是否包含独立的标题字体
@property(nonatomic,assign) BOOL hasTitleFont;

///内容颜色
@property(nonatomic,retain) UIColor *contentColor;

///是否包含独立的内容颜色
@property(nonatomic,assign) BOOL hasContentColor;

///内容字体
@property(nonatomic,retain) UIFont *contentFont;

///是否包含独立的内容字体
@property(nonatomic,assign) BOOL hasContentFont;

///标签1颜色
@property(nonatomic,retain) UIColor *label1Color;

///是否包含独立的标签1颜色
@property(nonatomic,assign) BOOL hasLabel1Color;

///标签2颜色
@property(nonatomic,retain) UIColor *label2Color;

///是否包含独立的标签2颜色
@property(nonatomic,assign) BOOL hasLabel2Color;

///标签3颜色
@property(nonatomic,retain) UIColor *label3Color;

///是否包含独立的标签3颜色
@property(nonatomic,assign) BOOL hasLabel3Color;

///标签4颜色
@property(nonatomic,retain) UIColor *label4Color;

///是否包含独立的标签4颜色
@property(nonatomic,assign) BOOL hasLabel4Color;

///标签5颜色
@property(nonatomic,retain) UIColor *label5Color;

///是否包含独立的标签5颜色
@property(nonatomic,assign) BOOL hasLabel5Color;

///文本控件字体颜色
@property(nonatomic,retain) UIColor *textColor;

///是否包含独立的文本控件字体颜色
@property(nonatomic,assign) BOOL hasTextColor;

///文本控件字体
@property(nonatomic,retain) UIFont *textFont;

///是否包含独立的文本控件字体
@property(nonatomic,assign) BOOL hasTextFont;

///文本控件背景颜色
@property(nonatomic,retain) UIColor *textBgColor;

///是否包含文本控件背景颜色
@property(nonatomic,assign) BOOL hasTextBgColor;

///徽标背景颜色
@property(nonatomic,retain) UIColor *badgeBgColor;

///是否包含独立的徽标背景颜色
@property(nonatomic,assign) BOOL hasBadgeBgColor;

///徽标字体颜色
@property(nonatomic,retain) UIColor *badgeTextColor;

///是否包含独立的徽标边界颜色
@property(nonatomic,assign) BOOL hasBadgeBorderColor;

///徽标边界颜色
@property(nonatomic,retain) UIColor *badgeBorderColor;

///是否包含独立的徽标字体颜色
@property(nonatomic,assign) BOOL hasBadgeTextColor;

///背部标签颜色
@property(nonatomic,retain) UIColor *backLabelColor;

///是否包含独立的背部标签颜色
@property(nonatomic,assign) BOOL hasBackLabelColor;

///背部标签字体
@property(nonatomic,retain) UIFont *backLabelFont;

///是否包含独立的背部标签字体
@property(nonatomic,assign) BOOL hasBackLabelFont;


#pragma -mark 类方法

+ (instancetype)cellData;


#pragma -mark 对象方法


///远程加载图片(异步)(path为空时使用KATImage的缓存路径)
- (void)loadRemoteImageWithSavePath:(NSString *)path andUrl:(NSString *)url;

///远程加载图片2(异步)(path为空时使用KATImage的缓存路径)
- (void)loadRemoteImage2WithSavePath:(NSString *)path andUrl:(NSString *)url;

///远程加载图片3(异步)(path为空时使用KATImage的缓存路径)
- (void)loadRemoteImage3WithSavePath:(NSString *)path andUrl:(NSString *)url;


///描述
- (NSString *)description;

///释放内存
- (void)dealloc;

@end
